import java.util.Scanner;

public class Test4 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        /*int n = input.nextInt();
        System.out.println(fun(n));*/

        //求斐波那契
        int q = input.nextInt();
        System.out.println(fun1(q));
    }
    public static int fun1(int n) {
        if (n == 1 || n == 2) {
            return 1;
        }
        return fun1(n - 1) + fun1(n - 2);
    }
    public static int fun(int n) {
        if (n / 10 == 0) {
            return n;
        }
        return (n%10) + fun(n / 10);
    }
}
